import Home from '../pages/Home'
import Detail from '../pages/Detail'
import Login from '../pages/Login'

import Index from '../pages/Home/Index/index'
import My from '../pages/Home/My'
import Car from '../pages/Home/Car'


// 路由表
const routes = [{
	path: '/home',
	component: Home,
	name: 'home',
	children: [{
		path: '/home/index',
		component: Index,
		name: 'index',
		title: '首页'
	}, {
		path: '/home/car',
		component: Car,
		name: 'car',
		title: '购物车'
	}, {
		path: '/home/my',
		component: My,
		name: 'my',
		title: '我的'
	}]
}, {
	path: '/detail/:id',
	component: Detail,
	name: 'detail'
}, {
	path: '/login',
	component: Login,
	name: 'login'
}, {
	from: '/',
	to: '/home/index'
}]


export default routes